package com.etalk.crm.controller;

import com.alibaba.fastjson.JSON;
import com.etalk.crm.pojo.QuestionBanks;
import com.etalk.crm.service.QuestionService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * Test
 *
 * @author Terwer
 * @version 1.0
 * 2018/12/27 10:47
 **/
@Controller
@RequestMapping("test")
public class TestController {
    @Resource
    private QuestionService questionService;

    @RequestMapping(produces = "application/json;charset=utf-8")
    @ResponseBody
    public String test() {
        QuestionBanks questionBanks = questionService.selectByQuestionIdAndScoreId(4055, 39);
        return JSON.toJSONString(questionBanks);
    }
}
